// src/mock/authData.js
const userData = {
    "code": 200,
    "data": {
        "token":"1234567890",
        "userInfo": {
            "id": 1,
            "username": "admin",
            "realName": "管理员",
            "avatar": "",
            "userType": "ADMIN"
        },
        "permissions": ["user:view", "user:add", "role:view"],
        "menuList": [
            {
                "id": 1,
                "path": "/dashboard",
                "name": "Dashboard",
                "component": "Layout",
                "meta": {
                    "title": "控制台",
                    "icon": "dashboard",
                    "alwaysShow": true
                },
                "children": [
                    {
                        "id": 2,
                        "path": "index",
                        "name": "DashboardIndex",
                        "component": "views/Dashboard",
                        "meta": {
                            "title": "首页",
                            "icon": "home"
                        }
                    }
                ]
            },
            {
                "id": 1,
                "path": "/product",
                "name": "Product",
                "component": "Layout",
                "meta": {
                    "title": "商品管理",
                    "icon": "product",
                    "permission": "product:view"
                },
                "children": [
                    {
                        "id": 2,
                        "path": "list",
                        "name": "ProductList",
                        "component": "views/product/List",
                        "meta": {
                            "title": "商品列表",
                            "icon": "list",
                            "permission": "product:view"
                        }
                    }
                ]
            },
            {
                "id": 3,
                "path": "/user",
                "name": "User",
                "component": "Layout",
                "meta": {
                    "title": "用户管理",
                    "icon": "user",
                    "permission": "user:view"
                },
                "children": [
                    {
                        "id": 4,
                        "path": "list",
                        "name": "UserList",
                        "component": "views/user/List",
                        "meta": {
                            "title": "用户列表",
                            "icon": "list",
                            "permission": "user:view"
                        }
                    },
                    {
                        "id": 5,
                        "path": "add",
                        "name": "UserAdd",
                        "component": "views/user/Add",
                        "meta": {
                            "title": "添加用户",
                            "icon": "add",
                            "permission": "user:add"
                        }
                    },
                    {
                        "id": 6,
                        "path": "edit/:id",
                        "name": "UserEdit",
                        "component": "views/user/Edit",
                        "meta": {
                            "title": "编辑用户",
                            "icon": "edit",
                            "permission": "user:edit"
                        }
                    }
                ]
            }
        ]
    }
};

// 定义用户菜单列表
const userMenuList = [
    {
        "id": 1,
        "path": "/dashboard",
        "name": "Dashboard",
        "component": "Layout",
        "meta": {
            "title": "控制台",
            "icon": "dashboard",
            "alwaysShow": true
        },
        "children": [
            {
                "id": 2,
                "path": "index",
                "name": "DashboardIndex",
                "component": "views/Dashboard",
                "meta": {
                    "title": "首页",
                    "icon": "home"
                }
            }
        ]
    }
];

// 定义管理员菜单列表
const adminMenuList = userData.data.menuList;

// 导出用户菜单列表和管理员菜单列表
export { userMenuList, adminMenuList };

// 导出默认的用户数据
export default userData;